<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/tabs.jsp"%>
<%@ taglib uri="http://www.myce.net.cn/ce-tag" prefix="ce"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link href="${ctx}/styles/tu.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/header.css" rel="stylesheet" type="text/css" />
<script type="text/javascript"	src="${ctx}/scripts/header.js"></script>
<script type="text/javascript"	src="${ctx}/scripts/maintablemenu.js"></script>
<script type="text/javascript"
	src="${ctx}/scripts/tags/unitedselect/UnitedSelect.js"></script>
<script language="JavaScript" src="${ctx}/scripts/common/prototype.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript">
	var ACTION_URL="${ctx}/charge_calculateAction.do?";
	var downExcelFileName = "";

	//获取当前选择的房号ID
	function getSelectedHouseID(){
		return window.frames("arCalculateListFrame").selectedHouseId;
	}

	//获取当前选择的房号
	function getSelectedHouseNum(){
		return window.frames("arCalculateListFrame").selectedHouseNumber;
	}

	//重新加载列表页面,不保留条件的刷新
	function reLoadIFrameList(){
		var url= $('fsearch').action + "&ec_s_sysDate=DESC";
		$('charStoChoList').src=url;
	}

	//重新加载列表页面,保留查询条件的刷新
	function reLoadIFrameListWithQuery(){
		window.frames("charStoChoList").freshFrame();
	}


	function changeMethodName(methodName){
		$('fsearch').action=ACTION_URL+"method="+methodName;
		if(methodName=="queryMeterList"){
				$('generalChargeItemID').style.display="none";
				$('meterChargeItemID').style.display="";
				$('fixedChargeItemID').style.display="none";

//				$('generalChargeItemID').name="generalChargeItemID";
//				$('meterChargeItemID').name="chargeItemId";
//				$('fixedChargeItemID').name="fixedChargeItemID";
				$('tchargeItem').show();
			}else if(methodName=="queryOtherList"){
				$('generalChargeItemID').style.display="none";
				$('fixedChargeItemID').style.display="";
				$('meterChargeItemID').style.display="none";

//				$('generalChargeItemID').name="generalChargeItemID";
//				$('meterChargeItemID').name="meterChargeItemID";
//				$('fixedChargeItemID').name="chargeItemId";
				$('tchargeItem').show();
			}else if(methodName=="queryGeneralList"){
				$('generalChargeItemID').style.display="";
				$('meterChargeItemID').style.display="none";
				$('fixedChargeItemID').style.display="none";

//				$('generalChargeItemID').name="chargeItemId";
//				$('meterChargeItemID').name="meterChargeItemID";
//				$('fixedChargeItemID').name="fixedChargeItemID";
				$('tchargeItem').show();
			}else{
				$('generalChargeItemID').style.display="none";
				$('meterChargeItemID').style.display="none";
				$('fixedChargeItemID').style.display="none";
				$('tchargeItem').hide();
			}
	}

	function search(){
		$('fsearch').submit();
	}

	function clearSearch(){
		$('fsearch').reset();
	}

	function showChargeItem(){
		$('chargeItemId').show();
		$('tchargeItem').show();
	}

	function hideChargeItem(){
		$('chargeItemId').hide();
		$('tchargeItem').hide();
	}

	function init(){
		$('fsearch').action=ACTION_URL+"method=queryGenneralChoList";
	}

	function reCalculate(){
		var url=ACTION_URL + "method=initRecalculation";
		top.windowOpen(url, 'addPage', '重算', 300, 520, true, "houseChooses");
	}

	function reCalculateAShouseId(){
		var url=ACTION_URL + "method=initRecalculation"+"&houseId="+getSelectedHouseID()+"&houseNumber="+getSelectedHouseNum();
		url=encodeURI(encodeURI(url));
		top.windowOpen(url, 'addPage', '重算', 300, 520, true, "houseChooses");
	}

/*	function openCalculate(){
	    checkHasArCalculate();
	//    alert(_result);
	    if(_result){
			var url=ACTION_URL + "method=initCalculate";
			top.windowOpen(url, 'calculate', '应收计算', 260, 450, true, "calculateI");
			}
	}

	var _result=false;*/
	function checkHasArCalculate(){
		var url=ACTION_URL + "method=checkHasArCalculate";
		var myAjax = new Ajax.Request(
	                    url,
	                    {method: 'post', parameters: '', asynchronous:true,
	                    onComplete:function (result) {
							if(result.responseText=="ok"){
									var url=ACTION_URL + "method=initCalculate";
									top.windowOpen(url, 'calculate', '应收计算', 260, 470, true, "calculateI");
							}else{
								Alert(result.responseText);
							}
						}});
	}

	function resultResponse(pars){
		var url=ACTION_URL+"method=calculate";
//		var obj=findFrame('AskConfirmIf');
//		obj.closewin();
		showLoading("${key.loadMessage}");
		sendAjaxRequest(url,pars,function (result) {
			hiddenLoading();
			if(result.responseText=="ok"){
				SuccessAlert("${key.success}");
				clearSearch();
				search();
			}
			ajaxSubmitException(result.responseText);
		});
	}

   function showCycleForward(){

   var url = "${ctx}/charge_chargeCycleForwardAction.do?method=chargeCycleForwardSmall";
		top.windowOpen(url, "chargeCycleForward", "", 340, 900);
   }

   function cycleForward(url){
    window.location.href=url;
   }

	function getRecalculation(){
		var url=ACTION_URL+"method=getRecalculation&fileName=" + downExcelFileName;
		$('downExcelFrame').src = url;
		search();
	}
</script>
</head>

<body onload="changeMethodName('queryGeneralList')">
<!--style="display:none"-->
<div style="overflow:auto; height:500px;">
<div class="pageNav_bg">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="50" id="pageNav_leftimg"><img
			src="${ctx}/images/ico_charge_yjgl.gif" width="46" height="47" /></td>
		<td id="navWord"><span class="page_title">${key.calculateTitle}</span></td>
		<td width="212" class="pageNav_right"><a href="#"
			style="CURSOR: hand;" onFocus="this.blur()" onClick="showCycleForward();"><img
			src="${ctx}/images/charage_buzhou.gif" border="0"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
			href="javascript:showFull_in();"><img id="full_image"
			src="${ctx}/images/ico_fullscreen.gif" border="0" /></a>
			<iframe
			class="iframeit" frameborder="0" border="0" scrolling="no"
			style="position:absolute; z-index:99; width:expression(this.nextSibling.offsetWidth); height:expression(this.nextSibling.offsetHeight); top:expression(this.nextSibling.offsetTop); left:expression(this.nextSibling.offsetLeft);"></iframe>


		<div id="drogmenu_div5" style="display: none">

		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			class="divboder">
			<tr class="divheader">
				<td align="left">&nbsp;&nbsp;<strong>收费流程</strong></td>
				<td align="right"><span title="关闭" style="CURSOR: hand; "
					onClick="drogmenu_div5.style.display='none'"><img
					src="${ctx}/images/ico_fastmenu_exit2.gif" width="16" height="16">
				&nbsp;</span></td>
			</tr>
			<tr>
				<td height="350" colspan="2" valign="top">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="window_head_outBg">
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td><img src="${ctx}/images/ico_Advance.gif" width="16"
									height="16" align="absmiddle"> <span
									class="window_head_intext">收费流程指引</span></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td class="aux_header_line_1"></td>
					</tr>
					<tr>
						<td class="aux_header_line_2"></td>
					</tr>
					<tr>
						<td valign="middle">
						<table width="700" border="0" align="center" cellpadding="0"
							cellspacing="0">
							<tr>
								<td rowspan="5" align="right"><img
									src="${ctx}/images/worktable_charge_jt1.gif" width="52"
									height="155" border="0"></td>
								<td align="center" valign="middle" class="img1"
									onDblClick="window.location.href='../sjlr/MainTable_sjlr_mana.htm';"><a
									href="#"><img src="${ctx}/images/ico_kj_sjlr.gif"
									border="0"></a></td>
								<td align="center" valign="middle"><img
									src="${ctx}/images/charge_sfzq_jt.gif" width="32" height="32"
									border="0"></td>
								<td align="center" valign="middle" class="img1"
									onClick="onclickShow('divLayer2')"
									onDblClick="window.location.href='../ysjs/MainTable_ysjs_mana.htm';"
									onMouseOut="onclickhidden('divLayer2')"><a href="#"><img
									src="${ctx}/images/ico_kj_yjgl.gif" border="0"></a></td>
								<td align="center" valign="middle"><img
									src="${ctx}/images/charge_sfzq_jt.gif" width="32" height="32"
									border="0"></td>
								<td align="center" valign="middle" class="img1"
									onClick="onclickShow('divLayer4')"
									onDblClick="window.location.href='../zdgl/MainTable_zdgl_mana.htm';"
									onMouseOut="onclickhidden('divLayer4')"><a href="#"><img
									src="${ctx}/images/ico_stp_notice.gif" border="0"></a></td>
								<td align="center" valign="middle"><img
									src="${ctx}/images/charge_sfzq_jt.gif" width="32" height="32"
									border="0"></td>

								<td align="center" valign="middle" class="img1"
									onClick="onclickShow('divLayer3')"
									onDblClick="window.location.href='../yjdc/MainTable_yjdc_mana.htm';"
									onMouseOut="onclickhidden('divLayer3')"><a href="#"><img
									src="${ctx}/images/ico_stp_dz.gif" border="0"></a></td>
								<td rowspan="5"><img
									src="${ctx}/images/worktable_charge_jt3.gif" width="52"
									height="155" border="0"></td>
							</tr>
							<tr>
								<td height="20" align="center" valign="middle">走表数据录入</td>
								<td align="center" valign="middle">&nbsp;</td>
								<td align="center" valign="middle">应收计算</td>
								<td align="center" valign="middle">&nbsp;</td>

								<td align="center" valign="middle">生成收费通知单</td>
								<td align="center" valign="middle">&nbsp;</td>
								<td align="center" valign="middle">预交款抵冲</td>
							</tr>
							<tr>
								<td height="80" colspan="7">&nbsp;</td>
							</tr>
							<tr>
								<td align="center" class="img1"
									onDblClick="window.location.href='../sfyj/MainTable_sfyj_mana.htm';"><a
									href="#"><img src="${ctx}/images/ico_stp_yejie.gif"
									border="0"></a></td>
								<td align="center"><img
									src="${ctx}/images/charge_sfzq_left.gif" border="0"></td>
								<td align="center" class="img1"
									onDblClick="window.location.href='../pzdy/MainTable_pzdy_mana.htm';"
									onClick="onclickShow('divLayer7')"
									onMouseOut="onclickhidden('divLayer7')"><a href="#"><img
									src="${ctx}/images/ico_stp_print.gif" border="0"></a></td>
								<td align="center"><img
									src="${ctx}/images/charge_sfzq_left.gif" border="0"></td>
								<td align="center" class="img1"
									onDblClick="window.location.href='../frontcharge/MainTable_frontcharge_mana.htm';"
									onClick="onclickShow('divLayer6')"
									onMouseOut="onclickhidden('divLayer6')"><a href="#"><img
									src="${ctx}/images/ico_kj_sfgl.gif" border="0"></a></td>
								<td align="center"><img
									src="${ctx}/images/charge_sfzq_left.gif" border="0"></td>
								<td align="center" class="img1"
									onDblClick="window.location.href='../yhhk/MainTable_yhhk_mana.htm';"
									onClick="onclickShow('divLayer5')"
									onMouseOut="onclickhidden('divLayer5')"><a href="#"><img
									src="${ctx}/images/ico_stp_yihang.gif" border="0"></a></td>
							</tr>
							<tr>
								<td align="center" height="20">收费月结</td>
								<td align="center">&nbsp;</td>
								<td align="center">收费凭证打印</td>
								<td align="center">&nbsp;</td>
								<td align="center">前台收费</td>
								<td align="center">&nbsp;</td>
								<td align="center">银行托收</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</div>
	</tr>
</table>
</div>

<div class="container">
<form action="" method="post" id="fsearch" target="arCalculateListFrame">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td><!-------------------------->
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td><!-----------------------------搜索1----------------------------->
				<table border="0" cellspacing="0" cellpadding="0" width="100%"
					class="bg_search" id="search01">
					<tr>
						<td>
						<table border="0" cellpadding="0" cellspacing="1">
							<tr>
								<td class="td_search"><a href="${ctx}/gs-20090622.xls"> ${key.buildingName}：</a></td>
								<td class="td_search">
								<pms:unitedSelect
								dataList="${buildingList}" id="buildingId" name="buildingId"
								optionLabel="name" optionValue="keyword"
								selectText="${key.pleaseSelect}" tabIndex="3"
								className="width:110px;"
								>
								</pms:unitedSelect>
								</td>
								<td class="td_search">${key.houseNumber}：</td>
								<td class="td_search">
								<input name="houseNumber"
									type="text" class="inputtext" size="16"></td>
								<td class="td_search" id="tchargeItem">${key.chargeitem}：</td>
								<td class="td_search">

								<pms:unitedSelect id="generalChargeItemID"
								name="generalChargeItemID"
								dataList="${generalChargeItemList}" optionLabel="itemName"
								optionValue="keyword" onChange="$(chargeItemId).value=this.value;"
								selectText="${key.pleaseSelect}" className="width:110px;">
								</pms:unitedSelect>

								<pms:unitedSelect id="meterChargeItemID"
								name="meterChargeItemID"
								dataList="${meterChargeItemList}" optionLabel="itemName"
								optionValue="keyword" style="display:none; " onChange="$(chargeItemId).value=this.value;"
								selectText="${key.pleaseSelect}" className="width:110px;">
								</pms:unitedSelect>

								<pms:unitedSelect id="fixedChargeItemID"
								name="fixedChargeItemID"
								dataList="${fixChargeItemList}" optionLabel="itemName"
								optionValue="keyword" style="display:none; " onChange="$(chargeItemId).value=this.value;"
								selectText="${key.pleaseSelect}" className="width:110px;">
								</pms:unitedSelect>

								<input type="hidden" id="chargeItemId" name="chargeItemId">

								</td>
								<td class="td_search">${key.periodName}：</td>
								<td class="td_search">
								<pms:unitedSelect id="periodId"
								name="periodId"
								dataList="${periodList}" optionLabel="period"
								optionValue="keyword"
								selectText="${key.pleaseSelect}" className="width:110px;">
								</pms:unitedSelect>
								</td>
								<td class="td_search">
								<table border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="buttonOffLeft" id="btn1_11"></td>
										<td class="buttonOffMiddle" id="btn1_12"
											onblur="btn_change(1)" onMouseOver="btn_change_over(1)"
											onMouseOut="btn_change_out(1)" onclick="search();"><img
											src="${ctx}/images/ico_searchico.gif" alt="" border="0"
											align="absmiddle" /> ${key.search}</td>
										<td class="buttonOffRight" id="btn1_13"></td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				<!---------------------------------------------搜索end---------------------->
				</td>
			</tr>
			<tr>
				<td valign="top">
				<!-- 右边按钮 -->
				<div id="rightButton" style="display:none">
				<table border="0" cellpadding="0" cellspacing="0" id="ico1">
					<tr>
					<pms:AuthTag authName="charge_calculateAction.do?method=calculate">
						<td class="toolbarico"><a href="#" onclick="checkHasArCalculate();"
							onfocus="this.blur()"><img
							src="${ctx}/images/chareg_ysjs_js.gif" border="0"
							align="absbottom" alt="${key.calculate}" />&nbsp;${key.calculate}</a></td>
					</pms:AuthTag>
					<pms:AuthTag authName="charge_calculateAction.do?method=recalculation">
						<td class="toolbarico"><a href="#" onclick="reCalculate();"
							onfocus="this.blur()"><img
							src="${ctx}/images/chareg_ysjs_cs.gif" alt="${key.recalculate}" border="0"
							align="absbottom" />&nbsp;${key.recalculate}</a></td>
					</pms:AuthTag>
					</tr>
				</table>
				</div>
				<!-- 结束 -->
				<div class="tab_bgline">
				<div id="enregister" class="tab_line">
<pms:tabPanel
		panelId="charStoCho" hasTop="false" iframeId="arCalculateListFrame"
		defaultHeight="322px">
<pms:AuthTag authName="charge_calculateAction.do?method=initGeneralList">
		<pms:tab tabId="generalList"
			baseUrl="${ctx}/charge_calculateAction.do?method=initGeneralList"
			caption="${key.generalAmt}"
			afterFunction="changeMethodName('queryGeneralList');clearSearch();showChargeItem();">
		</pms:tab>
</pms:AuthTag>
<pms:AuthTag authName="charge_calculateAction.do?method=initMeterList">
		<pms:tab tabId="meterList"
			baseUrl="${ctx}/charge_calculateAction.do?method=initMeterList"
			afterFunction="changeMethodName('queryMeterList');clearSearch();showChargeItem();"
			caption="${key.meterAmt}" >
		</pms:tab>
</pms:AuthTag>
<pms:AuthTag authName="charge_calculateAction.do?method=initOtherList">
		<pms:tab tabId="otherList"
			baseUrl="${ctx}/charge_calculateAction.do?method=initOtherList"
			afterFunction="changeMethodName('queryOtherList');clearSearch();showChargeItem();"
			caption="${key.otherAmt}" >
		</pms:tab>
</pms:AuthTag>
<pms:AuthTag authName="charge_calculateAction.do?method=initChargeTotalList">
		<pms:tab tabId="chargeTotalList"
			baseUrl="${ctx}/charge_calculateAction.do?method=initChargeTotalList"
			afterFunction="changeMethodName('queryChargeTotalList');clearSearch();hideChargeItem();"
			caption="${key.chargeTotal}" rightDiv="rightButton">
		</pms:tab>
</pms:AuthTag>
	</pms:tabPanel>


				</div>



					</td>
					</tr>
				</table>
				</div>

				</div>

				</td>
			</tr>
		</table>
	</tr>
</table>
</form>
</div>
</div>

<iframe style="display: none" src="" id="downExcelFrame" name="downExcelFrame"></iframe>
</body>
</html>
